body {
    margin:0;
    background: url('../images/Bg1.png') no-repeat center;
    background-size: cover;
    background-attachment: fixed;
}

#canvas {
    display: block;
    margin: 20px auto;
    width: 640px;
    height: 640px;
    background: url('../images/ChessBoard.png') no-repeat center;
    background-size: cover;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.white-success, .black-success, .blackPlayer, .whitePlayer {
    display: none;
    font-size: 1.4em;
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    animation: fadeIn 0.5s ease-in;
}

.white-success, .whitePlayer {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.black-success, .blackPlayer {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.mol-main {
    width: 300px;
    height: auto;
    margin: 0 auto;
    padding: 25px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0,0,0,0.2);
    text-align: center;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: none;
}

.mol-header h2 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 20px;
}

.btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

h1 {
    font-size: 2.5em;
    color: #2c3e50;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 10px;
    margin-top: -10px;
}

h2{
    font-size: 2em;
    color: #2c3e59;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 10px;
}

h6 {
    text-align: center;
    color: #2c3e50;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-size: 1.2em;
    margin-top: -10px;
    margin-bottom: 20px;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}



/* 添加新的样式 */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.control-btn {
    padding: 12px 25px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: #3498db;
    color: white;
    transition: all 0.3s ease;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.control-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.control-btn.abandon {
    background: #e74c3c;
}

.control-btn.abandon:hover {
    background: #c0392b;
}

.game-message {
    display:none;
    text-align: center;
    color: #09a0e7;
    font-size: 16px;
    margin: 5px auto;
    min-height: 24px;
    font-weight: bold;
}

.result-message {
    display: none;
    text-align: center;
    color: #e3d109;
    font-size: 30px;
    margin: 10px 0;
    min-height: 24px;
    font-weight: bold;
}

select {
    width: 140px; /* 设置宽度 */
    padding: 10px; /* 内边距增加用户体验 */
    border: 2px solid #ccc; /* 边框样式 */
    border-radius: 8px; /* 圆角效果 */
    background-color: #f9f9f9; /* 背景颜色 */
    font-size: 16px; /* 字体大小 */
    font-family: Arial, sans-serif; /* 字体样式 */
    color: #333; /* 字体颜色 */
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path fill="%23000" d="M0 0l5 6 5-6z"/></svg>');
    background-repeat: no-repeat; /* 防止重复背景 */
    background-position: right 10px center;
    background-size: 12px;
    cursor: pointer;
    transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out; /* 动态效果 */
}

/* 鼠标悬停效果 */
select:hover {
    border-color: #888; /* 改变边框颜色 */
}

/* 焦点效果 */
select:focus {
    border-color: #007BFF; /* 聚焦时边框颜色 */
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); /* 添加外发光效果 */
    outline: none; /* 移除默认的焦点样式 */
}



/* 容器样式 */
.options-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px; /* 每组间距 */
    max-width: 700px;
    margin: 3px auto;
    font-family: Arial, sans-serif;
}

/* 每个选项组的样式 */
.option-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 15px; /* 内边距 */
    border: 2px solid #007bff; /* 边框颜色 */
    border-radius: 8px; /* 圆角 */
    background-color: #f0f8ff; /* 浅蓝色背景 */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 添加阴影 */
    transition: transform 0.2s ease, box-shadow 0.2s ease; /* 动效 */
}

/* 鼠标悬停效果 */
.option-group:hover {
    transform: translateY(-2px); /* 轻微上浮 */
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2); /* 阴影加深 */
}

/* 标签样式 */
.option-label {
    font-size: 16px; /* 字体大小 */
    font-weight: bold; /* 加粗 */
    color: #0056b3; /* 深蓝色字体 */
    white-space: nowrap;
}

/* 选择框样式 */
.option-select {
    appearance: none;
    background-color: #ffffff; /* 白色背景 */
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 鼠标悬停和聚焦状态 */
.option-select:hover {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.option-select:focus {
    border-color: #0056b3;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 86, 179, 0.5);
}

/* 返回按钮样式 */
.index {
    position: absolute; /* 固定到页面 */
    top: 40px;
    left: 60px;
    padding: 10px 15px;
    background-color: #007bff; /* 蓝色背景 */
    color: #ffffff; /* 白色字体 */
    border: none;
    border-radius: 5px; /* 圆角 */
    cursor: pointer;
    font-size: 20px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* 返回按钮的悬停效果 */
.index:hover {
    background-color: #0056b3; /* 深蓝色 */
    transform: scale(1.05); /* 稍微放大 */
}